package com.baidu.utils;

import com.baidu.aip.face.AipFace;
import com.baidu.aip.imageprocess.AipImageProcess;

import static com.baidu.utils.App.*;

//AipOcrSample 实例化文字识别对象
//配置参数
public class AipImgSample {

    private static AipImageProcess aipImageProcess;

    public static AipImageProcess  getAipFace(){
        if(aipImageProcess == null){
            aipImageProcess = new AipImageProcess (APP_ID, API_KEY, SECRET_KEY);
            // 可选：设置网络连接参数
            aipImageProcess.setConnectionTimeoutInMillis(2000);
            aipImageProcess.setSocketTimeoutInMillis(60000);
        }

        return aipImageProcess;
    }

}